﻿<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport"
          content="width=device-width, initial-scale=1, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！-->
    <title>学生惠后台管理系统</title>
    <link rel="stylesheet" href="/App/Admin/public/css/bootstrap.min.css"/>
    <link rel="stylesheet" href="/App/Admin/public/css/style.css"/>
</head>
<body>
<div class="mainBody">
    
     <include file="Public:left"/>
    
    
    <div class="main">
        
      <include file="Public:top"/>

        <div class="subNav">
            <span class="text"><i class="iconFont">&#xe600;</i>惠通知 - 详情</span>
        </div>

        <div class="indexBox">
            <div class="con-det">
                <div class="row">
                    <div class="col-md-12">
                        <table class="formTable editForm">
                            <tr>
                                <td class="noBor" valign="top">商家名称：</td>
                                <td class="noBor" valign="top" >{$dataInfo.shop_name}</td>
                                <td class="noBor"></td>
                                <td class="noBor" valign="top">标题：</td>
                                <td class="noBor" valign="top">{$dataInfo.title}</td>
                            </tr>
                            <tr>
                                <td valign="top">内容：</td>
                                <td valign="top" colspan="4">{$dataInfo.description}</td>
                            </tr>
                            <tr>
                                <td valign="top">发布时间：</td>
                                <td valign="top">{$dataInfo.add_time|date='Y-m-d',###}</td>
                                <td></td>
                                <td valign="top">有效期：</td>
                                <td valign="top">{$dataInfo.start_time|date='Y-m-d',###}至{$dataInfo.end_time|date='Y-m-d',###}</td>
                            </tr>
                            <tr>
                                <td class="textAliRi" colspan="5">
                              
                                <if condition="$dataInfo.check_status eq 1 ">
                                <a href="javascript:;" class="btn btn-primary blue openNo" type="button">审核</a>
                                <else/>
                                </if>
                                    
                                    <a href="{:U('Notice/index')}" class="btn btn-default" type="button">返回</a>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>


<div class="modal fade popupNo" tabindex="-1" role="dialog">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                        aria-hidden="true">&times;</span></button>
                <h4 class="modal-title">请确认是否进行审核！</h4>
            </div>
            <form>
                <div class="modal-body">
                    <table class="formTable">
                        <tr>
                            <td class="name noBor">驳回原因：</td>
                            <td class="noBor">
                                <input type="text" class="inp form-control" id='bh' >
                            </td>
                        </tr>
                    </table>

                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-primary blue btn-success" cid='{$dataInfo.id}' >通过</button>
                    <button type="button" class="btn btn-primary blue btn-info" cid='{$dataInfo.id}' >驳回</button>
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                </div>
            </form>
        </div>
    </div>
</div>

<script type="text/javascript" src="/App/Admin/public/js/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="/App/Admin/public/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/App/Admin/public/js/public.js"></script>

<script>
    $(".btn-success").click(function(){
        var cid=$(this).attr('cid');
       
    	$.post('{:U('Notice/checkStatus')}',{cid:cid},function(data){
            if(data==100){
                $('#sh').css('display','none');
                alert('通过审核');
            }
        });
    })
</script>
<script>
    $(".btn-info").click(function(){
        var cid=$(this).attr('cid');
        var bh=$("#bh").val();
       $.post('{:U('Notice/reject')}',{'cid':cid,'bh':bh},function(data){
            if(data==1){
                $('#sh').css('display','none');
                alert('审核驳回');
            }
        });
    })
</script>

</body>
</html>








